package com.dykj.fireFighting.server.socialUnit.xfxg.service.impl;

import com.dykj.fireFighting.api.socialUnit.xfxg.entity.FireGroupDevice;
import com.dykj.fireFighting.api.socialUnit.xfxg.service.IFireGroupDeviceService;
import com.dykj.fireFighting.common.core.service.impl.BaseServiceImpl;
import com.dykj.fireFighting.server.socialUnit.xfxg.mapper.FireGroupDeviceMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;
import java.util.Map;

/**
 * 消防群组设备中间表
 *
 * @Author JacksonTu
 * @Date  2021-07-05 13:38:41
 */
@Slf4j
@DubboService
@Transactional(rollbackFor = Exception.class)
public class FireGroupDeviceServiceImpl extends BaseServiceImpl<FireGroupDeviceMapper, FireGroupDevice> implements IFireGroupDeviceService {
    @Override
    public int addFireGroup(FireGroupDevice fireGroupDevice){
        return baseMapper.insert(fireGroupDevice);
    }
    @Override
    public  List<String> getDeviceByFireGroupId(String fireGroupId, Integer type){
        return baseMapper.getDeviceByFireGroupId(fireGroupId,type);

    }
    @Override
    public int delFireGroupId(@Param("fireGroupId") String fireGroupId){
        return baseMapper.delFireGroupId(fireGroupId);
    }
}
